
package com.shop.cloud.mall.api.controller;

import com.shop.cloud.common.core.constant.SecurityConstants;
import com.shop.cloud.common.core.util.R;
import com.shop.cloud.weixin.common.feign.FeignWxAppService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * 微信应用
 *
 * @author
 * @date 2019-08-25 15:39:39
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/wxapp")
@Tag(description = "wxapp", name = "微信应用API")
public class WxAppController {

	private final FeignWxAppService feignWxAppService;

	/**
	 * 通过id查询微信应用配置
	 *
	 * @param id
	 * @return R
	 */
	@Operation(summary = "通过id查询微信应用配置")
	@GetMapping("/{id}")
	public R getById(@PathVariable("id") String id) {
		return R.ok(feignWxAppService.getById(id, SecurityConstants.FROM_IN));
	}
}
